package com.demo.OtherTest.mapTest1;

public class MapTest {
    public static void main(String[] args) {
        MapPoint[] points = new MapPoint[]{
//                new MapPoint(120.05999,30.315884),
//                new MapPoint(120.06068,30.315895),
//                new MapPoint(120.061034,30.315928),
//                new MapPoint(120.061894,30.315981),
//                new MapPoint(120.060019,30.315329),
//                new MapPoint(120.061999,30.3154658),
                new MapPoint(120.060007,30.315866),
                new MapPoint(120.060685,30.315898),
                new MapPoint(120.060723,30.315578),
                new MapPoint(120.061033,30.315592),
                new MapPoint(120.061035,30.315937),
                new MapPoint(120.061903,30.315972),
                new MapPoint(120.062005,30.315465),
                new MapPoint(120.060002,30.315347)
        };

//        MapPoint point = new MapPoint(120.060672,30.316113);
//        MapPoint point = new MapPoint(120.06091,30.315737);
//        MapPoint point = new MapPoint(120.060445,30.31561);
//        MapPoint point = new MapPoint(120.061228,30.315765);
//        MapPoint point = new MapPoint(120.060749,30.316064);//外
//        MapPoint point = new MapPoint(120.060445,30.315654);//内
//        MapPoint point = new MapPoint(120.061356,30.315608);//内
//        MapPoint point = new MapPoint(120.060878,30.315765);//凹内
        MapPoint point = new MapPoint(120.060856,30.315824);//凹内

        boolean pointInPolygon = GraphUtils.isPointInPolygon(point, points);
        System.out.println(pointInPolygon);
    }
}
